﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_videoimg_edit.aspx.cs" Inherits="admin_admin_videoimg_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="Mini/style/style.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#btnBack').click(function () {
                var x = $('#hidclassid').val();
                document.location = "admin_video_img.aspx";
            })
            $('#btnSave').click(function () {
                var filename = $('#flImg');
                if (filename.val() != "") {
                    var dotArray = filename.val().split(".");
                    if (dotArray.length < 2) {
                        alert("您上传的不是图片文件，请重新上传！");
                        return false;
                    }
                    else {
                        var FileExt;
                        FileExt = dotArray[dotArray.length - 1];
                        if (FileExt == "jpg" || FileExt == "jpeg" || FileExt == "gif" || FileExt == "png") {
                            return true;
                        }
                        else {
                            alert("您上传的不是图片文件，请重新上传！");
                            return false;
                        }
                    }
                }
            })
        });
        function check() {
            document.getElementById("txtMsg").value = document.getElementById("flImg").value;
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="hidclassid" type="hidden" runat="server" />
        <table class="toptable grid fixed" cellspacing="1" cellpadding="4" align="center"
            border="1">
            <tr>
                <tr>
                    <th>
                        视频Id
                    </th>
                    <td colspan="2">
                        <asp:TextBox ID="txtv_id" runat="server" ReadOnly="true"></asp:TextBox>
                    </td>
                </tr>
                <th>
                    主 键：
                </th>
                <td colspan="2">
                    <asp:TextBox ID="txtId" runat="server" Width="115px" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    视频图片：
                </th>
                <td colspan="2">
                    <input id="txtMsg" readonly="readonly" style="width: 237px" />
                    <asp:FileUpload ID="flImg" runat="server" Width="65px" Height="20px" onchange="check()" />
                    <asp:Label ID="lblPic" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="3" align="center">
                    <asp:Button ID="btnSave" runat="server" Text="保存修改" OnClick="btnSave_Click" /><input
                        id="btnBack" type="button" value="返回" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>

